<template>
    <div>
        <h4>添加汽车</h4>
        品牌：<input type="text" v-model="carObj.type"><br>
        价格：<input type="text" v-model="carObj.price"><br>
        产地：<input type="text" v-model="carObj.address"><br>
        <input type="button" value="添加" @click="add">
    </div>
</template>

<script>
export default {
    data(){
        return{
            carObj:{}
        }
    },
    methods:{
        async add(){
            var info = await this.ajax.getSubmit("/project/car/add",this.carObj);
            if(info == "ok"){
                this.$emit("page",{pageNO:1});
                this.carObj = {};
            }
        }
    }
}
</script>

<style>

</style>